<div class="container">
    <?php echo validation_errors("<div class='alert alert-danger'>", "</div>"); ?>
    <form class="form-horizontal" method="post">
        
        <div class="control-group">
            <label class="control-label">N° de Pedido</label>
            <div class="controls">
                <input type="text" class="span2 input-block-level" name="pedido" id="pedido">
            </div>
        </div>
        
        <div class="control-group">
            <label class="control-label">Cliente</label>
            <div class="controls">
                <select name="cliente" class="span6 chosen">
                    <?php foreach ($clientes as $cliente) { ?>
                    <option value="<?=$cliente['idCliente']?>"><?=$cliente['nombre']?></option>
                    <?php } ?>
                </select>
            </div>
        </div>
        
        <div class="control-group">
            <label class="control-label">Orden de Compra</label>
            <div class="controls">
                <input type="text" class="span2 input-block-level" name="orden">
            </div>
        </div>
        
        <div class="control-group">
            <label class="control-label">Moneda</label>
            <div class="controls">
                <select name="moneda" class="span2 chosen">
                    <?php foreach($monedas as $moneda) { ?>
                    <option value="<?=$moneda['idMoneda']?>"><?=$moneda['moneda']?></option>
                    <?php } ?>
                </select>
            </div>
        </div>
        
        <div class="control-group">
            <label class="control-label"></label>
            <div class="controls">
                <button type="submit" class="btn btn-primary">Crear</button>
            </div>
        </div>
        
    </form>
        
</div>

<script type="text/javascript">
    $(document).ready(function() {
        $("#pedido").focus();
        $(".chosen").chosen();
    });
</script>